{include file='comdir/head.html'}

<div class="content">
	<div class="animated fadeInDown">
		<div class="pos"><a href="#" onClick="javascript :history.back(-1);">返回上一页</a></div>
		<form class="form-horizontal" action="javascript:void(0)" id='frm'>
			<div class="form-group">
				<label class="col-sm-2 control-label">专题中文名</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="name" value="{$list.name}">
				</div>
			</div>
			<div class="form-group img_show_hide photo_hide" {if $list['photourl']==''}style="display:none"{/if} >
				<label class="col-sm-2 control-label">专题图片</label>
				<div class="col-sm-5">
					<img class="show_photourl" style="width:100px;height:30px;margin-bottom: 5px;" src="{$getConfig.upload_http}{$list['photourl']}" /><br />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">上传专题图片</label>
				<div class="col-sm-5">
					<input type="hidden" value="{$list.photourl}" name="photourl" class="photourl">
					<div class="iframe-box btn-blue">
						<iframe id="upiframe" frameborder="0"  scrolling="no" src="{$_URL}Ups/upone?method=special&classname=photourl&callback=photourlback"></iframe>
					</div>
				</div>
			</div>
			<div class="form-group img_show_hide bgimg_hide" {if $list['bgimgurl']==''}style="display:none;"{/if} >
				<label class="col-sm-2 control-label">专题背景图片</label>
				<div class="col-sm-5">
					<img class="show_bgimgurl" style="width:100px;height:30px;margin-bottom: 5px;" src="{$getConfig.upload_http}{$list['bgimgurl']}" /><br />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">上传专题背景</label>
				<div class="col-sm-5">
					<input type="hidden" value="{$list.bgimgurl}" name="bgimgurl" class="bgimgurl">
					<div class="iframe-box btn-blue">
						<iframe id="upiframe1" frameborder="0"  scrolling="no" src="{$_URL}Ups/upone?method=special_bg&classname=bgimgurl&callback=bgimgurlback"></iframe>
					</div>
					</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">播放视频地址</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="videourl" value="{$list['videourl']}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">是否推荐</label>
				<div class="col-sm-5">
					<div class="radio radio-inline">
						<input type="radio" id="recommend1" name="recommend" value="1" {if $list['recommend']==1}checked{/if} >
						<label for="recommend1">推荐</label>
					</div>
					<div class="radio radio-inline">
						<input type="radio" id="recommend2" name="recommend" value="0" {if $list['recommend']==0}checked{/if}>
						<label for="recommend2">不推荐</label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">专题介绍</label>
				<div class="col-sm-5">
					<textarea class="form-control" name="description">{$list['description']}</textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">专题模板</label>
				<div class="col-sm-5">
					<textarea class="form-control" name="template">{$list['template']}</textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">seo meta关键词</label>
				<div class="col-sm-5">
					<textarea class="form-control" name="metakeywords">{$list['metakeywords']}</textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">seo meta描述</label>
				<div class="col-sm-5">
					<textarea class="form-control" name="metadescription">{$list['metadescription']}</textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">是否启用</label>
				<div class="col-sm-5">
					<div class="radio radio-inline">
						<input type="radio" id="status1" name="status" value="1" {if $list['status']==1}checked{/if}>
						<label for="status1">启用</label>
					</div>
					<div class="radio radio-inline">
						<input type="radio" id="status2" name="status" value="0" {if $list['status']==0}checked{/if}>
						<label for="status2">不启用</label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-5">
					<input type="hidden" name="id" value="{$list['id']}">
					<input type="button" class="btn btn-block btn-blue sub" name="name" value="提交">
				</div>
			</div>
		</form>
	</div>
</div>
<script type="text/javascript">
var _URL='{$_URL}';
{literal}
function photourlback(data){
	var classname=data.classname;
	$('.'+classname).val(data.img);
	$('.img_show_hide').show();
	$('.show_'+classname).attr('src',data.imgshow);
}
function bgimgurlback(data){
	var classname=data.classname;
	$('.'+classname).val(data.img);
	$('.bgimg_hide').show();
	$('.show_'+classname).attr('src',data.imgshow);
}
$(function(){
    $('.sub').click(function(){
        var url=_URL+"Special/edit";
        var formjquery=_ajaxs.from('#frm');
        _ajaxs.post(url,'formjquery='+formjquery,function _result(data){
            ajax_status=true;
            layer.msg(data.msg,{icon: 1}, function(){
                if(data.status){
                    window.location.href=_URL+"Special/lists";
                }
            });
        });
    });
});
{/literal}
</script>
</body>
</html>
